﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using YunSpace.Application.SiteLibraryManage;

namespace YunSpace.Web.Areas.StatisticalForm.Controllers
{
    public class UserController : ControllerBase
    {
        private readonly SiteApp siteApp = new SiteApp();

        [HttpGet]
        public ActionResult GetIndexMapJson()
        {
            var maps = siteApp.GetSiteMaps();
            var data = maps.Select(x => new
            {
                id = x.F_Id,
                name = x.F_FullName.Replace('省', ' ').Trim(),
                value = x.Count
            });

            return Json(data, JsonRequestBehavior.AllowGet);
        }


    }
}